<h1>课程列表</h1>
<table class="easyui-datagrid list-table" style="width: 600px;height:auto;">
  <thead>
    <tr>
      <th field="id" width="110" align="center">ID</th>
      <th field="name" width="110" align="center">名称</th>
      <th field="operation" width="240" align="center">操作</th>
    </tr>
  </thead>
  <tbody>
    <% @courses.each do |course| %>
      <tr>
        <td><%= course.id %></td>
        <td><%= course.name %></td>
        <td><%= link_to "删除", {:action=>'destroy', :id=>course} %>  | <%= link_to "编辑", {:action => 'edit',:id=> course}%> </td> 
      </tr>
    <% end %>
  </tbody>
</table>

<%= link_to "添加课程", :action => "new" %>
